<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserCollection extends Model
{
    use HasFactory;

    protected $table = 'user_collections';
    protected $primaryKey = 'id';
    public $timestamps = true;
    protected $guarded = [];

    public function contents()
    {
        return $this->belongsTo(Content::class, 'content_id', 'id');
    }

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id');
    }
}
